# 如果一个可迭代对象的元素个数超过变量个数时会抛出一个ValueError。那么怎样才能从这个可迭代对象中解压出N个元素出来
import numpy as np

def drop_first_last(grades):
    first, *middle, last = grades
    return np.average(middle)

def demo_1():
    record = ('kepler', 'kepler@example.com', '12345', '54321')
    name, email, *phone_numbers = record
    print("{}, {}, {}".format(name, email, phone_numbers))
    *trailing, current = [1,2,3,4,5,6,7,8]
    print("{}, {}".format(trailing, current))

if __name__ == '__main__':
    print(drop_first_last([1,2,3,2]))
    demo_1()